<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>管理修改页面</title>
    <link rel="stylesheet" href="${ pageContext.request.contextPath}/resources/flower/css/modify.css">
</head>
<body>
<div class="big">
    <div class="content">
        <h1 class="storeName">
            罗小黑的花店
        </h1>
        <div class="modify">
            <sf:form action="${ pageContext.request.contextPath}/flowers/edit/${flower.flowerId}" method="post"
                     acceptCharset="UTF-8"
                     modelAttribute="flower" enctype="multipart/form-data">
                <table>
                    <tr>
                        <td> 图片:</td>
                        <td class="img">
                            <sf:input path="flowerId" type="hidden"/>
                            <img src="${ pageContext.request.contextPath}/resources/upload/${flower.flowerImgAddress}${flowerImg}"
                                 alt=""></td>
                        <input type="button" value="修改" class="sub">
                        <input type="file" name="img" class="file" accept="image/jpg,image/jpeg,image/png"></td>
                        <td></td>

                    </tr>

                    <tr>
                        <td>花名:</td>
                        <td><sf:input path="flowerName" type="text" value=""/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><span class="error"><sf:errors path="flowerName"/></span></td>
                    </tr>
                    <tr>
                        <td>库存:</td>
                        <td><sf:input path="flowerSaves" type="number" value="0"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><span class="error"><sf:errors path="flowerSaves"/></span></td>
                    </tr>
                    <tr>
                        <td><span class="flowerMeans">花语:</span></td>
                        <td><sf:textarea path="flowerMeans" cols="38" rows="9"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><span class="error"><sf:errors path="flowerMeans"/></span></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input type="submit" class="submit" value="保存">
                            <input type="reset" class="add" value="重置">
                            <a href="${ pageContext.request.contextPath}/flowers/delete/${flower.flowerId}" class="submit">删除</a>
                        </td>
                    </tr>
                </table>

            </sf:form>
        </div>
    </div>
</div>
</body>
</html>